/**
 * Created by Administrator on 2017/8/24.
 */
//选择器
function $() {var  s = arguments[0];if(s==null) return null;
else if(s.substr(0,1)=="#")return document.getElementById(s.substr(1));
else if(s.substr(0,1)==".")return document.getElementsByClassName(s.substr(1));
else return document.getElementsByTagName(s)}
//ajax请求
function ajax(Func,method,src,xor) {
    var xhr;
    if(window.XMLHttpRequest)
        xhr=new XMLHttpRequest();
    else
        xhr=new ActiveXObject("Microsoft.XMLHTTP");
    xhr.onreadystatechange=function()
    {
        if (xhr.readyState==4 && xhr.status==200)
        {
            Func(xhr.responseText);
        }
    };
    xhr.open(method,src,xor);
    xhr.send();
}
//window.onload事件
function main(Func) {window.addEventListener("load",Func);}